
//树形列表展示
function TreeModule() {}
	TreeModule.nodes = [];
	TreeModule.addNode = function(node)
	{
		TreeModule.nodes.push(node);
		for(var i = 0; i < TreeModule.nodes.length; i++)
		{
			if(TreeModule.nodes[i].nodeID == node.pNodeId )
			{
				TreeModule.nodes[i].appendChildNode(node);
			}
		}
	}
	function TreeNode(nID, pId, $n, d)
	{
		this.childrenNode = [];
		this.data = d;
		this.nodeID = nID;
		this.pNodeId = pId;
		this.nodeDOM = $n;
		this.childShowStatus = true;
	}
	TreeNode.prototype = 
	{
		appendChildNode : function(node)
		{
			this.childrenNode.push(node);
		},
		switchChildNodeDisplay : function()
		{
			if(this.childShowStatus)
			{
				this.hideChildNode();
				
			}
			else{
				this.showChildNode();
			}
		},
		showChildNode : function(){
			for(var i = 0; i < this.childrenNode.length; i++)
			{
				this.childrenNode[i].nodeDOM.show();
			}
			this.childShowStatus = true;
		},
		hideChildNode : function(){
			for(var i = 0; i < this.childrenNode.length; i++)
			{
				this.childrenNode[i].hideChildNode();
				this.childrenNode[i].nodeDOM.hide();
			}
			this.childShowStatus = false;
		}
	}